<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>body{
    height: 1000px;
    background-color: #000;;
}
.div1 {width: 100px;
height: 100px;
background-color: antiquewhite;
position: sticky;
margin-top: 200px;
top: 150px;}
.div2 {
    width: 1000px;
    height: 200px;
    background-color: pink;
}
    </style>
<body>
    <div class="div1"></div><div class="div2"></div>
</body>
</html>